<?php
add_footer_js(array(
    'assets/themes/admin/js/custom/tables.js'
));
?>
<ul class="maintabmenu">
    <li class="current"><a href="">Quản lý khách hàng</a></li>
</ul>
<div class="content">
    <div class="contenttitle radiusbottom0">
        <h2 class="table"><span>Danh sách khách hàng</span></h2>
    </div>
    <div class="tableoptions">
        <button class="deletebutton radius3" title="stdtable" value="<?php echo base_url();?>admin/customers/delete">Delete Selected</button> &nbsp;
        <label>Từ khóa: <input type="text" id="keyword"></label>        
        <button id="btn-search" class="radius3">Tìm kiếm</button>
    </div>
    <table id="stdtable" border="0" cellspacing="0" cellpadding="0" class="stdtable stdtablecb">
        <colgroup>
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">
            <col class="con0">
            <col class="con1">            
        </colgroup>
        <thead>
            <tr>
                <th class="head0">
                    <span class="checkbox">
                        <input class="checkall" type="checkbox"/>
                    </span>
                </th>
                <th class="head1">ID</th>
                <th class="head0">Email</th>
                <th class="head1">Họ tên</th>
                <th class="head0">Điện thoại</th>
                <th class="head1">Ảnh đại diện</th>
                <th class="head0">Giới tính</th>
                <th class="head1">Ngày sinh</th>
                <th class="head0">Trạng thái</th>                
                <th class="head1"></th>
            </tr>
        </thead>
        <tfoot>
            <tr>
                <th class="head0">
                    <span class="checkbox">
                        <input class="checkall" type="checkbox"/>
                    </span>
                </th>
                <th class="head1">ID</th>
                <th class="head0">Email</th>
                <th class="head1">Họ tên</th>
                <th class="head0">Điện thoại</th>
                <th class="head1">Ảnh đại diện</th>
                <th class="head0">Giới tính</th>
                <th class="head1">Ngày sinh</th>
                <th class="head0">Trạng thái</th>                
                <th class="head1"></th>
            </tr>
        </tfoot>
        <tbody>
            <?php foreach ($customers as $customer) { ?>
                <tr>
                    <td  style="text-align: center;">
                        <span class="checkbox"><input type="checkbox" value="<?php echo $customer->id; ?>"/></span>
                    </td>
                    <td  style="text-align: center;"><?php echo $customer->id; ?></td>
                    <td><?php echo $customer->email; ?></td>
                    <td><?php echo $customer->fullname; ?></td>
                    <td><?php echo $customer->phone; ?></td>
                    <td><?php echo $customer->avatar; ?></td>
                    <td><?php echo $customer->gender; ?></td>
                    <td><?php echo $customer->birthday; ?></td>
                    <td><?php echo $customer->status; ?></td>
                    <td>
                        <a href="<?php echo base_url();?>admin/customers/edit/<?php echo $customer->id; ?>" data="<?php echo $customer->id; ?>">Edit</a> | &nbsp;
                        <a href="<?php echo base_url();?>admin/customers/delete" data="<?php echo $customer->id; ?>" class="delete">Delete</a>
                    </td>
                </tr>            
            <?php } ?>
        </tbody>
    </table>
    <?php echo $list_link; ?>
</div>